home *** CD-ROM | disk | FTP | other *** search
-
- $Id: FutureOS 1.2 1996/07/20 09:24:38 heinz Exp $
-
- Amiga technologies is committed to move towards a PowerPC Amiga
- fairly rapidly. This means that the OS will change in many
- respects on the PowerPC side of things. We don't want to move just
- towards "OS 3.1 on a PowerPC", we want a better and modern OS.
- Quite a few changes will happen not only to exec.library but also
- to other subsystems. Many things are so low level that you have to
- be careful about them. This means that struct ExecBase and low
- level HW stuff should be considered a black box as far as humanly
- possible. We will add restrictions and declare previously used
- practices that stop us from moving forward illegal for PPC code.
- For previously legal things that cannot be supported any longer, we
- will have new replacement functionality.
-
- Specific restrictions and hints:
-
- - Do not use SysBase->ThisTask. DON'T! Use FindTask(NULL)
- instead. On a PowerPC Amiga, you might regret using ThisTask.
- While the OS 3.1 includes say "readable", as of January 1st,
- 1996, ThisTask is a private field.
-
- - Cache SysBase! Do not access $4 all the time if you can cache
- that value! This will improve performance a lot!
-
- - Stay away from Disable() and Forbid(). STAY AWAY FROM THEM!
- The semantics of Forbid() may be restricted to certain
- allowed uses. Use semaphores to protect shared data.
- Use of Forbid() "to speed up things" only demonstrates
- incompetence. Don't ever use inline macros for these
- functions and fix code that does.
-
- - Use semaphores to synchronize data access. Do not rely on
- "atomic" CPU instructions, task priorities or Forbid().
- Use signals and message replies for communication
- by interrupt code. Don't depend on current behaviour of the
- scheduler.
-
- - Don't try to fiddle with the Lists in ExecBase. They might
- disappear. A new OS will provide access functions for really
- important stuff. See the warning about Forbid().
-
- - Stay away from low level functions like trap or exception
- handling functions.
-
- - Stay away especially from these functions:
-
- exec.library/AllocAbs
- exec.library/AllocTrap
- exec.library/Disable
- exec.library/Enable
- exec.library/Forbid
- exec.library/FreeTrap
- exec.library/GetCC
- exec.library/ObtainQuickVector
- exec.library/OldOpenLibrary
- exec.library/Permit
- exec.library/SetExcept
- exec.library/SetFunction
- exec.library/SetIntVector
- exec.library/SetSR
- exec.library/SetTaskPri
- exec.library/SuperState
- exec.library/Supervisor
- exec.library/UserState
-
- They may change, become completely or partly obsolete and
- unusable. This does not mean that you don't have to be
- careful about use of any other functions. If you feel that
- something might be a hack, better don't do it!
-
- - Note not only for SetTaskPri(): It is not legal to modify
- tasks that you do not handle and own.
-
- - OldOpenLibrary() will finally end in an Alert(). Yeah!
-
- - Expect interrupt handling to change in many ways. If you can,
- don't do interrupt stuff. Stay at the task/process level.
-
- - You could theoretically still access these fields
-
- AttnFlags (which will be pretty useless on a PowerPC and
- replaced with a query function)
-
- VBlankFrequency (which has always been a tricky value)
-
- PowerSupplyFrequence (which is no longer accurate even
- on current hardware)
-
- if they were still there in a future OS, but obviously we
- will set up access function for the necessary things.
-
- - If there is an OS function to do things or access structures,
- use it. If there isn't, you should take this as indicator
- that you should not do those things at the moment.
-
- - The HW that you know will disappear, too. No more hacking
- into OCS/ECS/AGA registers. Use graphics.library. No more
- hacking into CIA's. Use timer.device, parallel.device,
- serial.device.
-
- - If you can feel that something might be of questionable
- value, stability, or portability even before you did it, then
- don't do it.
-
- - The OS can not and could not be shut down and revived again.
- Don't even try it. You will die, lose all the functionality
- and experience all the nasty things hidden by the OS.
-
- - Banging the HW usually only shows incompetence.
-
- - A different CPU will obviously use a different assembly
- language with different instructions and restrictions. Don't
- expect highly CPU dependend things like calling conventions
- and LVO tables to remain the same. Another reason to stay
- away from assembler if you want to stay portable.
-
- - As mentioned above there won't be something like an "atomic
- instruction" anymore. You must use semaphores or appropriate
- access functions to modify fields where a simple bit change
- with one instruction used to be sufficient on a 680x0 based
- machine. The OS will change appropriately to be
- multiprocessing compatible. This is important, so we mention
- it again.
-
- - From the notes above you can see that there may or may not be
- a very tightly integrated 68K emulation on a PowerPC machine.
- We won't trade PowerPC performance for 68K emulation. If we
- did, we could go on building 68K machines exclusively. The
- future emphasis is on PowerPC obviously, not on 68K. An
- emulation will most likely not give you what native code
- can do. Don't expect switching on the fly between arbitrary
- pieces of code for different CPU types just whenever you feel
- like it.
-
- - Stay modular, clean, and in a high level language for better
- compatibility and portability.
-
- Realize what this means? On a PowerPC Amiga, ExecBase and a lot
- more in the OS as you know it will disappear and change. Just like
- IntuitionBase did in 1991. To quote a really good comment:
-
- /* I told you this was private.
- * The data beyond this point has changed, is changing, and
- * will continue to change.
- */
-
- Heinz Wrobel
- <heinz@amiga.de>
-
-